home *** CD-ROM | disk | FTP | other *** search
/ Graphics Plus / Graphics Plus.iso / general / viewers / polyview / hdf-ucd.lha / HDF-UCD / facetedge.h < prev    next >
Text File  |  1992-03-03  |  3KB  |  64 lines

  1. typedef enum { quad = 0, tri = 1} facetype;
  2.  
  3.  
  4. #define qfaes 11 /* quad face array element size */
  5. #define tfaes  9 /* tri face array element size */
  6. #define caes   3 /* cell array element size */
  7. #define pcaes  2 /* plane cell array element size */
  8. #define pfaes  4 /* plane faces array element size */
  9. #define Faes   4 /* Faces array element size */
  10. #define HFaes  4 /* HullFaces array element size  */
  11. /* to understand above definitions also refer to main.h */
  12.  
  13. #define fop    5 /* faces in a prism */
  14. #define foh    6 /* faces in a hexahedron */
  15. #define fot    4 /* faces in a tetrahedron */
  16.  
  17. #define vqf    4 /* vertices in a quad face */
  18. #define vtf    3 /* vertices in a triface */
  19.  
  20. #define qversions   8  /* number versions of a quad face, change names  */
  21. #define tversions   6  /* number versions of a triface                  */
  22.  
  23. static char FACETYPE[4][15] = {"", "hull", "symhull", "blank"};
  24.                               
  25. #define HULL       1         /* face type hull => a + is outside cell      */
  26. #define SYMHULL    2         /* a + is inside hull, a - outside            */
  27. #define BLANK      3         /* interior face                              */
  28.  
  29. static int qvoarray[8] = { 0, 1, 1, 2, 2, 3, 3, 0};/*  origin array, enext */
  30. static int qvearray[8] = { 2, 7, 4, 1, 6, 3, 0, 5};/* array for quad faces */
  31.  
  32. static int tvoarray[6] = { 0, 1, 1, 2, 2, 0}; /* origin array, enext array */   
  33. static int tvearray[6] = { 2, 5, 4, 1, 0, 3}; /* for tri faces             */  
  34.  
  35.  
  36. int boundfacenum=0;     /* variable to keep track of # boundary faces      */
  37.                 
  38. /* processing hexahedral cells */
  39. int qfaces[6][11];         /* stores info for one hexahedral cell         */
  40. int qmfaceindex[6]; /* stores indices of matching faces in quad face array */
  41. BOOLEAN qmfaceflag[6]; /* flag indicating if face already in quad  */
  42.                                        /* faces, one for each face          */
  43.  
  44.  
  45. /* processing tetrahedral cels */
  46. int tfaces[4][9];                   /* same as for hexahedral cells, only  */
  47. int tmfaceindex[4];            /* now we have 4 faces all triangular faces */
  48. BOOLEAN tmfaceflag[4];
  49.  
  50.  
  51. /* processing prisms */
  52. int pqfaces[3][11];                             /* prism has 3 quad faces */
  53. int ptfaces[2][9];                                     /* and 2 tri faces */
  54. int pqtmfaceindex[5];             /* same as for hexahedra and tetrahedra */
  55. BOOLEAN pqtmfaceflag[5];
  56.  
  57.  
  58. /* processing  pyramids */
  59. int pyqfaces[1][11];         /* pyramid has one quad face and 4 tri faces */
  60. int pytfaces[4][9];               /* same as for hexahedra and tetrahedra */
  61. int pyqtmfaceindex[5];
  62. BOOLEAN pyqtmfaceflag[5];
  63.  
  64.